package com.recommendation.action;

import java.sql.SQLException;

import javax.naming.NamingException;

import com.recommendation.db.Dao;
import com.recommendation.domain.RecommendScope;

public class OptionsAction extends ActionBase{

	private RecommendScope scope;
	
	public String execute()
	{
		long userId = getUserId();
		try {
			scope = Dao.INSTANCE.getRecommendScope(userId);
		} catch (NamingException e) {
			error(e);
			return ERROR;
		} catch (SQLException e) {
			error(e);
			return ERROR;
		}
		return SUCCESS;
	}

	public RecommendScope getScope() {
		return scope;
	}
}
